//
//  BPMessageTableViewCell.m
//  BabyPhotograph
//
//  Created by cesh on 2017/3/28.
//  Copyright © 2017年 cesh. All rights reserved.
//

#import "BPMessageTableViewCell.h"

@interface BPMessageTableViewCell()

@property (weak, nonatomic) IBOutlet UILabel *timeLbl;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *content;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bgImgHeight;
@property (weak, nonatomic) IBOutlet UIView *separatorView;
@property (weak, nonatomic) IBOutlet UILabel *detailLbl;
@property (weak, nonatomic) IBOutlet UIImageView *detailImg;

@end

@implementation BPMessageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setData:(NSDictionary *)data {
    _data = data;
    self.title.text = data[@"title"];
    self.timeLbl.text = data[@"timeStr"];
    self.content.text = data[@"content"];
    
    long type = [data[@"type"] longValue];
    if (type) {
        
    }
    else {
        self.separatorView.hidden = YES;
        self.detailLbl.hidden = YES;
        self.detailImg.hidden = YES;
        self.bgImgHeight.constant = 75;
        [self layoutIfNeeded];
    }
}

@end
